home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr22 / mcalc199.zip / DEMO04.MCP < prev    next >
Text File  |  1994-10-16  |  670b  |  43 lines

  1. 1   k=-1
  2.     goto 3
  3. 2   k=1
  4.     goto 3
  5. 3   a=26
  6.     b=1.0e20
  7.     d=b
  8.     c=-b
  9.     e=c
  10. for i=0 to rcl(a+4)-1 step 1
  11.     x=rcl(i+rcl(a))
  12.     y=rcl(i+rcl(a+1))
  13.     if x<b then b=x
  14.     if x>c then c=x
  15.     if y<d then d=y
  16.     if y>e then e=y
  17. next
  18. f=(b+c)/2
  19. g=(c-b)/2
  20. h=(d+e)/2
  21. j=(e-d)/2
  22. graph f-1.1*g,h-1.1*j,f+1.1*g,h+1.1*j
  23. for i=0 to rcl(a+4)-1 step 1
  24.     x=rcl(i+rcl(a))
  25.     y=rcl(i+rcl(a+1))
  26.     dot x,y
  27. next
  28. color 3
  29. for x=b to c step (c-b)/400
  30.     if k<0 then gosub 100
  31.     if k>0 then gosub 200
  32.     if x=b then pixel x,y,-1
  33.     line x,y
  34. next
  35. end
  36.  
  37. 100 interpol  a,x
  38.     y=last
  39.     return
  40. 200 interpol_ a,x
  41.     y=last
  42.     return
  43.